#define _CRT_SECURE_NO_WARNINGS 1
#include "shared_ptr.hpp"

void test_shared_ptr()
{
	ghs::shared_ptr<int> sp1(new int(2));
	ghs::shared_ptr<int> sp2(sp1);
	ghs::shared_ptr<int> sp3(sp1);

	ghs::shared_ptr<int> sp4(new int(3));
	ghs::shared_ptr<int> sp5(sp4);

	std::cout << sp1.use_count() << std::endl;
	std::cout << sp4.use_count() << std::endl;

	sp3 = sp4;
	std::cout << sp1.use_count() << std::endl;
	std::cout << sp4.use_count() << std::endl;

}

int main()
{
	test_shared_ptr();

	return 0;
}